﻿using System;
using VNet.VisiSuite.Service.Contact.Message.Base;

namespace VNet.VisiSuite.Common.Security
{
    public static class UserTransportToken
    {
        private static UserIdentity _identity;

        private static readonly Object LockObject = new object();

        public static UserIdentity UserIdentity
        {
            get
            {
                if (_identity == null)
                {
                    lock (LockObject)
                    {
                        if (_identity == null)
                        {
                            _identity = new UserIdentity();
                        }
                    }
                }
                return _identity;
            }
        }
    }
}